uncased
Case-preserving, ASCII case-insensitive no_std
string types.
An uncased string is case-preserving. That is, the string itself contains cased characters, but comparison (including ordering, equality, and hashing) is ASCII case-insensitive.
use UncasedStr;
let x: &UncasedStr = "hello!".into;
let y: &UncasedStr = "HelLo!".into;
assert_eq!;
assert_eq!;
assert_eq!;
See the documentation for detailed usage information.
Usage
Add the following to your Cargo.toml
:
[]
= "0.9"
This crate is #![no_std]
compatible. By default, the alloc
feature is
enabled, which enables the Uncased
type but requires alloc
support. To
disable the feature, disable this crate's default features:
[]
= { = "0.9", = false }
Note: This crate does not perform Unicode case-folding. For Unicode
case-folding, see unicase
.
License
uncased
is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in uncased
by you shall be dual licensed as above without any
additional terms or conditions.